<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            padding-bottom: 800px;
            padding-left: 30px;
        }
        .menu{
            position: fixed;
            top:0px;
            left: 0px;
            width: 260px;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            transform: translate(-100%,0);
            transition: all 400ms ease;
        }
        .menu.show{
            transform: translate(0%,0);
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- 视口(视窗) -->
        <div class="menu" :class="{ show:flag }">
            <input type="button" value="close" @click=" flag = false">
        </div>
        <input type="button" value="open" @click=" flag = true">
    </div>
    <script type="module">
        // 加载 Vue3 的ESM 模块文件
        import { createApp } from "../assets/vue3/vue.esm-browser.js"
        createApp({
            data(){
                return {
                    flag:false
                }
            }
        }).mount("#app")
    </script>
</body>
</html>